home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tcoop10a.zip / DOC.ZIP / EFFECT.DOC < prev    next >
Text File  |  1991-11-20  |  5KB  |  116 lines

  1. EFFECT.DOC      11/20/91        Copyright (c) 1991 by James S. Clark
  2. ==========================================================================
  3. EFFECT
  4. Effect Class
  5. --------------------------------------------------------------------------
  6. Class Name                      Effect
  7. Superclass                      Play
  8. Category                        Sound
  9. Other classes referenced        <none>
  10. Other catagories referenced     <none>
  11. Used by                         many
  12. Inherited by                    <none>
  13. Maturity Index                  low
  14.  
  15. Declaration                     Effect  fx;
  16. Instance Variables
  17.                                 <none>
  18. Instance Methods
  19.                                 Effect  ()      { };
  20.                                 ~Effect ()      { };
  21.                                 void    generator(int wave, int time,
  22.                                                   int hifreq, int lofreq,
  23.                                                   int step, int dur);
  24.                                 void    alarm   (int time)
  25.                                 void    bomb    (int time)
  26.                                 void    computer(int time)
  27.                                 void    explode (int time)
  28.                                 void    explode2(int time)
  29.                                 void    laser   (int time)
  30.                                 void    phone   (int time)
  31.                                 void    police  (int time)
  32.                                 void    raygun  (int time)
  33.                                 void    tinkle  (int time)
  34. --------------------------------------------------------------------------
  35. GENERAL DESCRIPTION
  36.  
  37. The Effect Class is used to create a number of sound effects using the
  38. Sound Class, and produces the tones on the internal speaker.  A general
  39. purpose frequency modulated waveform generator method is called to load
  40. sound buffer.  Several waveforms are provided: square, triangle, ramp up,
  41. ramp dowm, and random.
  42.  
  43. A group of pro-programmed special effects are also included, that
  44. demonstrate the versatility of the effect generator.
  45.  
  46. Note:  The Effects Class is derived from the Play Class, and contains
  47. all the functionality of Play!  There is no need to use the Play Class
  48. when using Effects.  Do NOT create more than one instance of the Play
  49. or Effect Class at any given time, or it may cause system failure.
  50.  
  51. --------------------------------------------------------------------------
  52. VARIABLES
  53.  
  54.         <none>
  55.  
  56. --------------------------------------------------------------------------
  57. METHODS
  58.  
  59.     Effect    ()    { };
  60.                 Creates and initializes the sound effects generator.
  61.  
  62.     ~Effect    ()    { };
  63.                 Closes down the sound effects generator.
  64.  
  65.         void    generator(int wave, int time, int hifreq, int lofreq,
  66.                 int step, int dur);
  67.                 Generates a series of tones for the given length of time,
  68.                 between the hi and lo frequencies.  Step is used to
  69.                 increment or decrement the frequency.  Duration is the
  70.                 tone length.
  71.  
  72.     void    alarm    (int time)
  73.                 The sound of an alarm clock.  The time is given in
  74.                 milliseconds (1/100s of a second).
  75.  
  76.     void    bomb    (int time)
  77.                 The sound of a bomb dropping.
  78.  
  79.     void    computer(int time)
  80.                 The sound of a computer thinking.
  81.  
  82.         void    explode (int time)
  83.                 A low rumbling explosion.
  84.  
  85.     void    explode2(int time)
  86.                 A high frenzied explosion.
  87.  
  88.     void    laser    (int time)
  89.                 The sound of a laser generator.
  90.  
  91.     void    phone    (int time)
  92.                 The sound of a phone bell.
  93.  
  94.     void    police    (int time)
  95.                 The sound of a police siren.
  96.  
  97.     void    raygun  (int time)
  98.                 The sound of a martian raygun.
  99.  
  100.     void    tinkle    (int time)
  101.                 The sound of high-pitched tinkling.
  102.  
  103. --------------------------------------------------------------------------
  104. FREQUENCY MODULATING WAVE FORMS
  105.  
  106. SQUARE          produces a square wave, for hilo and pulsed sounds
  107. TRIANGLE        produces a triangle wave, for sirens and warbles.
  108. RAMPUP          produces a sawtooth up wave, for droplets, rayguns.
  109. RAMPDOWN        produces a sawtooth down wave, for bombs, falling.
  110. RANDOM          produces a random waveform, for explosions, computer.
  111.  
  112. --------------------------------------------------------------------------
  113. EFFECT.DOC                      Copyright (c) 1991 by James S. Clark
  114. ==========================================================================
  115.  
  116.